package com.qf.hospital.exception;

import com.qf.hospital.enums.HospitalExceptionEnums;

/**
 * @author zjw
 * @description
 * @date 2021/10/15 14:37
 */
public class HospitalException extends RuntimeException {

    private Integer code;

    public HospitalException( Integer code,String message) {
        super(message);
        this.code = code;
    }

    public HospitalException(HospitalExceptionEnums enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
